package javaBase.nowcoder.HJ1_B_字符串最后一个单词的长度;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.nextLine();
        word = word.trim().substring(word.trim().lastIndexOf(" ")+1);
        System.out.println(word.trim().length());
    }
}
